a={}
b=dict()
c={"a":1,"b":2}
print(type(a))
print(type(b))
print(type(c))

d={"a":1,"b":2,"a":3}
print(d)

d2=dict(aaa= ('aaa','gz','大一'),bbb=('bbb','sz','大二'))
d3=dict([(123123,('aaa','gz','大一')),(234234,('bbb','sz','大二'))])
d4=dict(zip((123123,234234),(('aaa','gz','大一'),('bbb','sz','大二'))))
print(d2)
m=d2["bbb"][1]
print(m)
print(d3)
print(d4)

#嵌套
d5={123123:{'姓名':"aaa","城市":"gz","年级":"大一"},234234:{'姓名':"bbb","城市":"sz","年级":"大二"}}
print(d5)
n=d5[234234]["年级"]
print(n)

#更新
d["a"]=2
print(d)
d["c"]=3
print(d)
print("---------------")

#删除
x=d.pop("b")
print(d)
d.popitem()
print(d)
d.clear()
print(d)
#key
keys=d5.keys()
print(keys)

for k in keys:
    print(k)
    print(d5[k])

for k in d5:
    print(k)
    print(d5[k])

y=len(d5)
print(y)